<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="wilmar" uri="/wilmar-process"%>
<html>
<head>
<wilmar:process.head datatable="true" tooltip="true" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="page.title.pdlist" /></title>
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						$('#pdlist')
								.dataTable(
										{
											"sPaginationType" : "full_numbers",
											"sDom" : '<"top"fi>rt<"bottom"lp<"clear">',
											"bAutoWidth" : false,
											"oLanguage" : {
												"sLengthMenu" : "<s:text name='datatable.text.lengthmenu' />",
												"sZeroRecords" : "<s:text name='datatable.text.zerorecords' />",
												"sInfo" : "<s:text name='datatable.text.info' />",
												"sInfoEmtpy" : "<s:text name='datatable.text.infoemtpy' />",
												"sInfoFiltered" : "<s:text name='datatable.text.infofiltered' />",
												"sSearch" : "<s:text name='datatable.text.search' />",
												"oPaginate" : {
													"sFirst" : "<s:text name='datatable.text.frist' />",
													"sPrevious" : "<s:text name='datatable.text.previous' />",
													"sNext" : "<s:text name='datatable.text.next' />",
													"sLast" : "<s:text name='datatable.text.last' />"
												}
											}
										});
						$('#actions img[title]').tooltip('#common_tooltip');
					});
</script>
</head>
<body>
<center><wilmar:process.logo /></center>
<table id="pdlist" cellpadding="0" cellspacing="0" border="0"
	width="100%">
	<thead>
		<tr align="center">
			<th><s:text name="table.title.process.definition.dbid" /></th>
			<th><s:text name="table.title.process.definition.description" /></th>
			<th><s:text name="table.title.process.definition.pdid" /></th>
			<th><s:text name="table.title.process.definition.key" /></th>
			<th><s:text name="table.title.process.definition.name" /></th>
			<th><s:text name="table.title.process.definition.version" /></th>
			<th><s:text name="table.title.actions" /></th>
		</tr>
	</thead>
	<tbody>
		<s:iterator value="%{processDefinitionVOList}"
			id="processDefinitionVOList" status="voList">
			<s:url namespace="/process" id="newInst"
				action="processDefinitionAction" method="doGoToStartForm">
				<s:param name="processInformation.processDefinitionId">
					<s:property value="id" />
				</s:param>
			</s:url>
			<s:url namespace="/process" id="imgUrl"
				action="processDefinitionAction"
				method="doGetDefinitionImageForward">
				<s:param name="processInformation.processDefinitionId">
					<s:property value="id" />
				</s:param>
			</s:url>
			<s:url namespace="/process" id="remove" 
				action="processDefinitionAction" method="doRemoveLastestVersionOfProcessDefinition">
				<s:param name="processInformation.processDefinitionId">
					<s:property value="id"/>
				</s:param>
				<s:param name="processInformation.processDeploymentId">
					<s:property value="deploymentId"/>
				</s:param>
			</s:url>
			<s:url namespace="/process" id="remove_all"
				action="processDefinitionAction" method="doRemoveAllVersionOfProcessDefinition">
				<s:param name="processInformation.processDefinitionKey">
					<s:property value="key"/>
				</s:param>
			</s:url>
			<tr align="center">
				<td><s:property value="deploymentId" /></td>
				<td><s:property value="description" /></td>
				<td><s:property value="id" /></td>
				<td><s:property value="key" /></td>
				<td><s:property value="name" /></td>
				<td><s:property value="version" /></td>
				<td>
				<div id="actions"><s:a href="%{newInst}">
					<wilmar:process.icon icon="newInstance" />
				</s:a> <s:a href="%{remove}">
				 <wilmar:process.icon icon="remove_beta" height="16px" width="39px" /></s:a>
				 <s:a href="%{remove_all}">
				<wilmar:process.icon icon="removeall_beta" height="16px"
					width="39px" /></s:a> <s:a href="%{imgUrl}">
					<wilmar:process.icon icon="image" />
				</s:a></div>
				</td>
			</tr>
		</s:iterator>
	</tbody>
</table>
<div id="common_tooltip">&nbsp;</div>
</body>
</html>